#include "newdevicedialog.h"
#include "ui_newdevicedialog.h"

NewDeviceDialog::NewDeviceDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::NewDeviceDialog)
{
    ui->setupUi(this);

    ui->comboBoxNewDevice->addItem("RS232Device");
    ui->comboBoxNewDevice->addItem("DahengCameraDevice");
    ui->comboBoxNewDevice->addItem("JakaRobotDevice");
    ui->comboBoxNewDevice->addItem("RecognizeDevice");

    connect(ui->comboBoxNewDevice, &QComboBox::currentIndexChanged, this, &NewDeviceDialog::onComboBoxIndexChanged);

    m_strCurrentDevice = ui->comboBoxNewDevice->currentText();
}

NewDeviceDialog::~NewDeviceDialog()
{
    delete ui;
}

void NewDeviceDialog::onComboBoxIndexChanged(int index){
    m_strCurrentDevice = ui->comboBoxNewDevice->currentText();
}
